# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-ovos-workshop
pkgver=0.0.13_alpha17
pkgrel=1
pkgdesc="Frameworks, templates and patches for the mycroft universe "
url="https://github.com/OpenVoiceOS/OVOS-workshop"
# s390x blocked by py3-speechrecognition -> py3-ovos-backend-client
arch="noarch !s390x"
license="Apache-2.0"
depends="
	py3-lingua-franca
	py3-ovos-backend-client
	py3-ovos-config
	py3-ovos-config
	py3-ovos-utils
	py3-rapidfuzz
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-adapt-parser
	py3-lingua-franca
	py3-pytest
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/OpenVoiceOS/ovos-workshop/archive/refs/tags/${pkgver//_alpha/a}.tar.gz"
options="!check" # OVOS-utils
builddir="$srcdir/OVOS-workshop-${pkgver//_alpha/a}"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
692c65a6d4b7d7a110949bbd5d76f3403d7c17179faabce922d4af4126e9fc0494a2bb80de397351089f31dc9ec66949ceee0276ef30abf9385d2e8dd6882ad1  py3-ovos-workshop-0.0.13_alpha17.tar.gz
"
